﻿/*
 * 
 * Description: Office COMAddins Connector office object library dispatcher
 */
#ifndef OCC_CPPTAPPLICATION_H
#define OCC_CPPTAPPLICATION_H

namespace {
constexpr const DWORD DISPID_POWERPOINTAPP_GET_COMADDINS = 0x7f3;
constexpr const DWORD DISPID_POWERPOINTAPP_QUIT = 0x7e5;
}

class CPptApplication : public COleDispatchDriver {
public:
    CPptApplication() {}
    CPptApplication(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
    CPptApplication(const CPptApplication &dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
    LPDISPATCH get_COMAddIns()
    {
        LPDISPATCH result;
        InvokeHelper(DISPID_POWERPOINTAPP_GET_COMADDINS, DISPATCH_PROPERTYGET, VT_DISPATCH, (void *)&result, nullptr);
        return result;
    }
    void Quit()
    {
        InvokeHelper(DISPID_POWERPOINTAPP_QUIT, DISPATCH_METHOD, VT_EMPTY, nullptr, nullptr);
    }
};

#endif  // !OCC_CPPTAPPLICATION_H